package simpleGeom;

import java.util.ArrayList;

public class Mapper {
float min=Float.POSITIVE_INFINITY;
float max=Float.NEGATIVE_INFINITY;



public Mapper(){
	 min=Float.POSITIVE_INFINITY;
	 max=Float.NEGATIVE_INFINITY;
}
public Mapper(float min,float max){
	this.min=min;
	this.max=max;
}


float getPercentage(float v){
	float d=max-min;
	
	if (d<0.0000000001)return 0;
	return (v-min)/(max-min);
}
float getLogarithmic(float v){
	return 0;
}

public void addValue(float v){
	//System.out.println(v);
	if (v<min)min=v;
	if (v>max)max=v;
}
public float getMin() {
	return min;
}
public void setMin(float min) {
	this.min = min;
}
public float getMax() {
	return max;
}
public void setMax(float max) {
	this.max = max;
}


}
